<script lang='ts' setup>
import { reactive,onMounted,ref} from 'vue'
 
const state = reactive({
    dormData: {
		brand: '格力',
		name: '格力打印机',
		residue: '3 (家居 |  30ml)',
		libsType: 1,
		count: 1,
		remark: ''
	},
    rowId: 0
})

const props = withDefaults(defineProps<{
    option: any,
    modelValue: boolean, 
}>(), {
    modelValue: false,
	option: () => ({
		brand: '格力',
		name: '格力打印机',
		residue: '3 (家居 |  30ml)',
		libsType: 1,
		count: 1,
		remark: ''
	})
})

const emit = defineEmits(['update:modelValue'])

const closeDialog = () => {
    emit('update:modelValue', false)
}

const saveHandle = () => {
	closeDialog()
}

</script>

<template>
    <main>
        <el-dialog v-model="props.modelValue" title="盘库" @close="closeDialog" style="width: 800px;" center>
            <el-form 
				label-width="100px" 
				style="max-width: 500px"
			>
				<el-form-item label="品牌名称:">
					<span>{{ state.dormData.brand }}</span>
				</el-form-item>
				<el-form-item label="商品名称:">
					<span>{{ state.dormData.name }}</span> 
				</el-form-item>
				<el-form-item label="剩余数量:">
					<span>{{ state.dormData.residue }}</span> 
				</el-form-item>
				<el-form-item label="盘库类型:">
					<el-radio-group v-model="state.dormData.libsType">
						<el-radio :label="1">重置</el-radio>
						<el-radio :label="2">增加</el-radio>
						<el-radio :label="3">减少</el-radio>
					</el-radio-group>
				</el-form-item>
				<el-form-item label="重置数量:">
					<el-input-number v-model="state.dormData.count" :precision="0" :step="1" :min="0" :max="10000" />
				</el-form-item>
				<el-form-item label="备注:">
					<el-input
						v-model="state.dormData.remark"
						maxlength="100"
						placeholder="输入备注信息"
						show-word-limit
						type="textarea"
					/>
				</el-form-item>

				<el-form-item label=" ">
					<el-button type="primary" size="large" @click="closeDialog">取消</el-button>
					<el-button type="primary" size="large" @click="saveHandle">保存</el-button>
				</el-form-item>
			</el-form>

			
        </el-dialog> 
    </main>
</template>

<style lang='scss' scoped>

</style>